﻿using System;
using System.Collections.Generic;
using System.Linq;

namespace Awesome.Extensions.Common
{
    public static class CommonEx
    {
        private static bool InInternal<T>(this T value, IEnumerable<T> set)
        {
            return set.Contains(value);
        }

        public static bool In<T>(this T value, params T[] set)
        {
            return value.InInternal(set);
        }

        public static bool In<T>(this T value, IEnumerable<T> set)
        {
            return value.InInternal(set);
        }

        public static T DeepClone<T>(this T @object)
        {
            throw new NotImplementedException();
        }
        public static bool NotNull<T>(this T value)
            where T : class
        {
            return value != null;
        }
    }

}
